package com.gperp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gperp.mapper.AsContactsMapper;
import com.gperp.pojo.AsContacts;
import com.gperp.pojo.AsContactsExample;
import com.gperp.service.AsContactsService;

@Service("asContactsService")
public class AsContactsServiceImpl implements AsContactsService{
	@Autowired
	private AsContactsMapper asContactsMapper;
	@Override
	public List<AsContacts> queryGetList(Long id) {
		AsContactsExample example = new AsContactsExample();
		example.createCriteria().andCustomidEqualTo(id);
		
		return asContactsMapper.selectByExample(example);
	}
	@Override
	public int delete(Long id) {
		// TODO Auto-generated method stub
		return asContactsMapper.deleteByPrimaryKey(id);
	}
	@Override
	public int insertcontacts(AsContacts contacts) {
		// TODO Auto-generated method stub
		return asContactsMapper.insertSelective(contacts);
	}
	@Override
	public int updateContacts(AsContacts contacts) {
		// TODO Auto-generated method stub
		return asContactsMapper.updateByPrimaryKeySelective(contacts);
	}

}
